<%@page import="com.baoyanghui.common.Constants"%>
<%@page import="com.baoyanghui.config.Configs"%>
<%@page import="com.baoyanghui.common.Utils"%>
<%@page import="com.baoyanghui.common.InterfaceAccess"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	if (Utils.empty((String)request.getSession().getAttribute(Configs.SESSION_USER_ID))
			|| (Constants.USER_TYPE_CUSTOMER == (Integer)request.getSession().getAttribute(Configs.SESSION_USER_TYPE))) {
		response.getWriter().print("<script type='text/javascript'>\n");
		response.getWriter().print("window.location.href='" + request.getContextPath() + "/index.jsp';\n");
		response.getWriter().print("</script>\n");
		response.getWriter().flush();
		return;
	}
%>
<script type="text/javascript" src="../js/add_customer.js"></script>
<img src="<%= request.getContextPath() %>/image/icon_add_off.png" alt="" style="margin-left: 35px;"/>
<img class="pointer fade_effect" src="<%= request.getContextPath() %>/image/icon_search.png" alt="" 
	onclick="show_search_customer_tab();"/><br/>
<h2 style="margin-left: 15px;">新增客户信息</h2>
<div style="position: relative; z-index: 1001;">
	<form>
		<div style="width: 430px; float: left; margin-left: 20px; line-height: 50px;vertical-align: top;">
			<label>*车牌号码：</label><input type="text" id="license" name="license" onblur="checkLicense();"/><br/>
			<label>*车型：</label><input type="text" id="model" name="model" onblur="checkModel();"/><br/>
			<label>*排量：</label><input type="text" id="displacement" name="displacement" onblur="checkDisplacement();"/><br/>
			<label>*购买年月：</label><input type="text" id="buy_date" name="buy_date" onblur="checkBuydate();"
				title="日期格式如下：YYYY-MM"/><br/>
		</div>
		<div style="width: 430px; float: left; padding-left: 50px; line-height: 50px;">
			<object id="flash_upload" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540002"
				type="application/x-shockwave-flash" width="119" height="34">
			  <param name="movie" value="<%= request.getContextPath() %>/flash/upload.swf?ws_context=<%= InterfaceAccess.InterfaceContext %>" />
			  <param name="quality" value="high" />
			  <param name="wmode" value="transparent"/>
			  <embed src="<%= request.getContextPath() %>/flash/upload.swf?ws_context=<%= InterfaceAccess.InterfaceContext %>" 
			  	wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" 
			  	allowScriptAccess="sameDomain" allowFullScreen="false"
			  	type="application/x-shockwave-flash" width="119" height="34">
			  </embed>
			</object>
			<img id="img_merchant" src="" alt="" width="165px" height="90px" align="top"/><br/>
			<label>*客户姓名：</label><input type="text" id="name" name="name" onblur="checkName();"/><br/>
			<label>*手机号码：</label><input type="text" id="mobile" name="mobile" onblur="checkMobile();"/><br/>
		</div>
		<div style="clear:both;"></div>
		<div align="center" style="margin-top: 50px; padding-bottom: 75px;">
			<input type="hidden" id="image_name" name="image_name"/>
			<img class="pointer fade_effect" id="btn_add_customer" alt="" src="../image/btn_confirm.png" onclick="addCustomer();">
			<img class="pointer fade_effect" alt="" src="../image/btn_cancel.png" style="margin-left: 40px;" onclick="showInitpage();">
		</div>
		<span id="error_message"></span>
	</form>
</div>
<div id="div_alert" align="center" style="width: 100%; position: absolute; left: 0px; top: 200px; z-index: 2001;
		visibility: hidden;">
	<div style="width: 330px; height: 140px; background: url('../image/bg_cover.png');">
		<div style="padding-top: 25px; font-size: 13pt;">是否继续添加养护信息？</div>
		<div style="margin-top: 45px;">
			<img class="pointer fade_effect" alt="" src="../image/btn_yes.png"/>
			<img class="pointer fade_effect" alt="" src="../image/btn_no.png" onclick="showInitpage();"/>
		</div>
	</div>
</div>